﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ListDepartments.ascx.cs" Inherits="MockPrjTeam4.Pages.Views.ListDepartments" %>
<%@ Import Namespace="MockPrjTeam4.Entity" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<style type="text/css">
    .wrap
    {
        height: 580px;
        width: 850px;   
        margin-left: 50px;
        margin-top: 30px;
    }
    .btn
    { 
        text-align: right;
        width: 100%;    
    }
    .btnChild
    {
        height: 22px;
        width: 80px;
        background-color: White;
        font-weight: bold;
        font-family: Times New Roman;
        font-size: medium;
        content: black;
    }
    .style1
    {
        height: 54px;
    }
</style>
<div class="wrap">
    <div class="btn">
        <asp:Button ID="btnInactive" runat="Server" Text="In-active" 
            CssClass="btnChild" BackColor="White"/>&nbsp
        <asp:Button ID="btnSave" runat="Server" Text="Save" CssClass="btnChild"/>&nbsp
        <asp:Button ID="btnBack" runat="Server" Text="Back" CssClass="btnChild"/>&nbsp
    </div>
    <asp:ScriptManager runat="Server"></asp:ScriptManager>
    <asp:TabContainer runat="Server" >
        <asp:TabPanel ID="tpDepartments" runat="Server">
            <HeaderTemplate>
                <span style="font-weight: bold;">Departments</span>
            </HeaderTemplate>
            <ContentTemplate>
                <table border="0" cellspacing="2px" cellpadding="2px" width="100%">
                	<tr>
                		<td class="style1">
                            <asp:LinkButton ID="lkbtnAll" runat="server" Text="All" ForeColor="Blue"
                            CommandName="SearchAll" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
                            <asp:LinkButton ID="lkbtn09" runat="server" Text="0 - 9" ForeColor="Blue"
                            CommandName="Search09" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
                            <asp:LinkButton ID="lkbtnAE" runat="server" Text="A B C D E" ForeColor="Blue"
                            CommandName="SearchAE" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
                            <asp:LinkButton ID="lkbtnFJ" runat="server" Text="F G H I J" ForeColor="Blue"
                            CommandName="SearchFJ" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
                            <asp:LinkButton ID="lkbtnKN" runat="server" Text="K L M N" ForeColor="Blue"
                            CommandName="SearchKN" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
                            <asp:LinkButton ID="lkbtnOR" runat="server" Text="O P Q R" ForeColor="Blue"
                            CommandName="SearchOR" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
                            <asp:LinkButton ID="lkbtnSV" runat="server" Text="S T U V" ForeColor="Blue"
                            CommandName="SearchSV" OnCommand="Click"></asp:LinkButton>&nbsp|&nbsp
                            <asp:LinkButton ID="lkbtnWZ" runat="server" Text="W X Y Z" ForeColor="Blue"
                            CommandName="SearchWZ" OnCommand="Click"></asp:LinkButton>
                        </td>
                        <td class="style1">
                            <asp:Button ID="btnCreate" runat="server" Text="Create" CssClass="btnChild" 
                                onclick="btnCreate_Click"/>&nbsp
                            <asp:CheckBox ID="chkInactive" runat="server" Text="Include In-active?" 
                                oncheckedchanged="chkInactive_CheckedChanged" AutoPostBack="true"/>
                        </td>
                	</tr>
                    <tr>
                		<td colspan="2">
                            <asp:GridView ID="gvListDepartments" runat="server" AllowPaging="True" 
                            AllowSorting="True" AutoGenerateColumns="False" Width="100%"
                            DataKeyNames="DepartmentId" BackColor="White" BorderColor="#CC9966" 
                                BorderStyle="None" BorderWidth="1px" CellPadding="4" PageSize="15"
                                OnPageIndexChanging="gvListDepartments_PageIndexedChanging">
                                <Columns>
                                    <asp:BoundField DataField="DepartmentName" HeaderText="Department Name" 
                                    SortExpression="DepartmentName"/>
                                    <asp:BoundField DataField="AddressLine1" HeaderText="Address Line 1"
                                    SortExpression="AddressLine1"/>
                                    <asp:BoundField DataField="PostCode" HeaderText="PostCode"
                                    SortExpression="PostCode"/>
                                    <asp:BoundField DataField="ContactId" HeaderText="Contact"
                                    SortExpression="ContactId"/>
                                    <asp:BoundField DataField="IsActive" HeaderText="Is Active"
                                    SortExpression="IsActive"/>
                                    <asp:CommandField HeaderText="Select" ShowSelectButton="True"
                                    ShowHeader="True">
                                    <ControlStyle Font-Underline="True" ForeColor="Red" />
                                    </asp:CommandField>
                                </Columns>
                                <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                                <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
                                <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
                                <RowStyle BackColor="White" ForeColor="#330099" />
                                <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                                <SortedAscendingCellStyle BackColor="#FEFCEB" />
                                <SortedAscendingHeaderStyle BackColor="#AF0101" />
                                <SortedDescendingCellStyle BackColor="#F6F0C0" />
                                <SortedDescendingHeaderStyle BackColor="#7E0000" />
                            </asp:GridView>
                        </td>
                	</tr>
                </table>
            </ContentTemplate>
        </asp:TabPanel>
    </asp:TabContainer>
</div>
